Skip to content

Minor improvements - normalize error strings and remove dead code - #27

Merged
polymorcodeus merged 2 commits into
mainfrom
minor-improv
Sep 9, 2026
Merged

polymorcodeus merged 2 commits into
mainfrom
minor-improv

Conversation

@polymorcodeus

Copy link
Copy Markdown
Owner

Summary

Normalizes error strings to lowercase, wraps boundary errors, removes unused template helpers, and deduplicates TOML search-result wrapping. No user-facing behavior changes.

What's new

  • Lowercase error strings - all fmt.Errorf strings in internal/book and cmd/book are lowercase with no trailing punctuation, including acronyms (url, not URL).
  • Boundary error wrapping - web.LoadWebsite and bs.VerifyUniqueURL errors are wrapped with context at the call site in cmd/book/mark.go.
  • Dead code removal - deletes unused UserViewTemplates and GetTemplate from internal/book/templates.go.
  • TOML wrapping helper - adds catalog.SearchResultList and replaces anonymous struct wrappers in cmd/book/mark.go.

Behavior changes / guardrails

  • No CLI behavior changes; existing commands, flags, and interactive flows produce the same output.
  • Wrapped errors still chain correctly via %w.

Testing

  • Existing unit tests cover error paths, search, and trash listing.
  • make check runs fmt, vet, lint, and tests; all green.

@polymorcodeus polymorcodeus self-assigned this Sep 9, 2026
@polymorcodeus
polymorcodeus merged commit 91140df into main Sep 9, 2026
4 checks passed
@polymorcodeus
polymorcodeus deleted the minor-improv branch September 9, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant